﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace QAS.Nekorama2.Controllers
{
    public class NewQuestionController : Controller
    {
        //
        // GET: /NewQuestion/
        

        public ActionResult Index()
        {
            Session["IsLoggedIn"] = true;
            return View();
        }

        public void PostNewQuestion()
        {
            string title = Request.Form["title"].ToString().Trim();
            string content = Request.Form["content"].ToString().Trim();
            int bounty = Int16.Parse(Request.Form["bounty"].ToString().Trim());
            String[] tag = Request.Form["tag"].ToString().Trim().Split(',');
        // save to session

            DateTime createdate = DateTime.Now;
            // get user ID from session
            
            if (tag.Length >= 5)
            {
                Response.Redirect("NewQuestion/Index.cshtml");
                // get title, content.... from session and display
            }
                      

        }


    }
}
